package com.leo.foodmaster.admin.purchase.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.leo.foodmaster.admin.foodMaterial.entity.FoodMaterial;
import com.leo.foodmaster.admin.purchase.entity.PurchaseBill;
import com.baomidou.mybatisplus.extension.service.IService;
import com.leo.foodmaster.commons.entity.Result;

import java.util.List;

/**
 * <p>
 * 采购单 服务类
 * </p>
 *
 * @author Leo
 * @since 2021-08-01
 */
public interface IPurchaseBillService extends IService<PurchaseBill> {

    /**
     * 条件分页查询采购清单
     * @param page 分页参数
     * @param serialNum 采购单编号
     * @param supplierId 供应商Id
     * @param statusList 审核状态
     * @param paymentType 支付类型
     * @param payStatus 支付状态
     * @param beginTime 开始时间
     * @param endTime 结束时间
     * @return IPage<PurchaseBill>
     */
    IPage<PurchaseBill> getPurchaseBillPageList(Page<PurchaseBill> page, String serialNum, Long supplierId,
                                                List<String> statusList, String paymentType, String payStatus,
                                                String beginTime, String endTime);

    /**
     * 新增采购清单
     * @param purchaseBill 采购清单
     * @return Result<Object>
     */
    Result<Object> addPurchaseBill(PurchaseBill purchaseBill);

    /**
     * 修改采购清单
     * @param purchaseBill 采购清单
     * @return Result<Object>
     */
    Result<Object> updatePurchaseBill(PurchaseBill purchaseBill);

    /**
     * 删除采购清单
     * @param id 采购单Id
     * @return Result<Object>
     */
    Result<Object> deletePurchaseBill(Long id);

    /**
     * 审核采购清单
     * @param purchaseBill 采购清单
     * @return Result<Object>
     */
    Result<Object> checkPurchaseBill(PurchaseBill purchaseBill);

    /**
     * 根据采购清单Id查询采购单详情
     * @param id 采购单Id
     * @return PurchaseBill
     */
    PurchaseBill getPurchaseBillById(Long id);

    /**
     * 条件查询采购清单列表
     * @param serialNum 采购单号
     * @param supplierId 供应商Id
     * @param statusList 状态列表
     * @param paymentType 支付类型
     * @param payStatus 支付状态
     * @param beginTime 开始时间
     * @param endTime 结束时间
     * @return 结果
     */
    List<PurchaseBill> getFoodMaterialList(String serialNum, Long supplierId, List<String> statusList,
                                           String paymentType, String payStatus, String beginTime, String endTime);
}
